#!/usr/bin/python
import pycurl
from StringIO import StringIO

buffer = open("xx",'wb')
c = pycurl.Curl()
c.setopt(c.URL, 'http://www.xunfei.cn/')
c.setopt(c.WRITEDATA, buffer)
c.perform()
c.info()
c.close()

#body = buffer.readlines()
# Body is a string in some encoding.
# In Python 2, we can print it without knowing what the encoding is.
#print(body)
